home *** CD-ROM | disk | FTP | other *** search
-
-
- /*
- *
- *
- * $Revision: 1.1 $
- *
- *
- *
- *
- * $Log: C:/pbmdtsts/include/showbox.hpv $
-
- Rev 1.1 20 May 1993 11:07:50 C_BAKER
-
- This revision appears to clear up the problem of the
- heap not being restored properly when the class is destroyed.
-
- Rev 1.0 19 May 1993 13:30:12 C_BAKER
- Initial revision.
- *
- */
- #ifndef SHOWBOXCLASS
- #define SHOWBOXCLASS
-
- inline int min(int a, int b)
- {
- return ( (a < b) ? a : b );
- }
-
- inline int max(int a, int b)
- {
- return ( (a > b) ? a : b );
- }
-
-
- class Box {
- unsigned char far * BaseScreen;
- unsigned char far * WorkScreen;
- ushort BoxWidth;
- ushort BoxHite;
- int Xpos, Ypos;
- uchar Attrib; // requested attribute
- char AbsPos;
-
- int BreakLineInx;
- char * Brokenlines[20]; // pointers used to break up lines
-
- char RetChar;
- char *LMsg; // pointer to storage allocated for message
- char *LTitle; // pointer to storage allocated for title
- char *SavedScreenArea; // pointer to storage allocated for underlying screen area
-
- void BuildTheBox(void);
- void MessageInBox(void);
- void TitleOnBox(void);
- void FillTheBox(void);
- void ShadeTheBox(void);
- void SaveScreenArea(void);
- void RestoreScreenArea(void);
- void BreakLine ( int inx, char ** ptr );
- void BreakupMessage(void);
-
- public:
- Box ( char * Title, char * Msg, int Xpos, int Ypos, uchar Attrib );
- Box ( char * Title, int Xpos, int Ypos, uchar Attrib );
- Box ( char * Title, char * Msg, uchar ReqAttrib );
- ~Box(void);
- void Redraw(char *);
-
- };
-
- class ErrorBox : Box {
-
- public:
- ErrorBox( char * Msg, int Continuous );
- ErrorBox( char * Msg );
-
- };
-
- #endif
-
-
-